#ifndef __CLASS_DB_MANGER_H__
#define __CLASS_DB_MANGER_H__

#include <ArduinoJson.h>

class DBManger
{
private:
    DynamicJsonDocument jdoc;

public:
    DBManger(/* args */);
    ~DBManger();

    void init();
    JsonArray getWiFiEntry();
    JsonArray getLightEntry();

    int getLampType();
    void setLampType(int type);

    void loadLampValue(int16_t (*lightVal)[4]);
    void setLampValue(int16_t lightVal[4]);
private:
    void load();
    void save();
};

extern DBManger dbManger;

#endif //!__CLASS_DB_MANGER_H__